<script>
	export default {
		props: {
			level: {
				type: [Number, String],
				default: 5
			}
		},
		data() {
			return {
				key: 'value',
				h1: '标题'
			}
		},
		render(h) {
			return h(
				'h' + this.level,
				{
					class: ['aaa', 'ccc'],
					attrs: {
						...this.$attrs
					},
					style: {
						color: '#ccc',
						fontsize: '18px'
					},
					on: {
						click: this.handle
					},
					scopedSlots: {
						default: () => h('el-button', '按钮')
					}
				},
				[h('p', this.h1), h('div', this.key)]
			)
		},

		methods: {
			handle() {
				console.log('handle')
			}
		}
	}
</script>

<style lang="scss" scoped></style>
